package com.hirain.strategy;

/**
 * Created by caicf on 2016/8/26.
 */
public class TDuck implements Duck {

    private FlyStrategy flyStrategy;

    public TDuck() {
    }

    public void setFlyStrategy(FlyStrategy flyStrategy) {
        this.flyStrategy = flyStrategy;
    }

    public TDuck(FlyStrategy flyStrategy) {
        this.flyStrategy = flyStrategy;
    }

    @Override
    public void queue() {
        System.out.println("tang lao ya");
    }

    public void  fly(){
        flyStrategy.fly();
    }
}
